import i18n from "@/lang";
import {getLabelStatusStr} from "@/utils/labelOrder";

export function getMiddleStatus(status, cancel){
  if(cancel){
    return i18n.t('middle.重新入库')
  }
  switch (status){
    case 0:
      return i18n.t('middle.待确认')
    case 1:
      return i18n.t('middle.待拣货')
    case 2:
      return i18n.t('middle.待传箱标')
    case 3:
      return i18n.t('middle.待送仓')
    case 4:
      return i18n.t('middle.已送仓')
  }

  return '';
}

export function getMiddleLabelStatusStr(row){
  if(row.labelStatus === 0 || !row.labelOrder){
    return i18n.t('shipment.无需贴标')
  }
  return getLabelStatusStr(row.labelOrder.status)
}


export function getMiddleSendTypeStr(type){
  switch (type){
    case 1:
      return i18n.t('middle.合并送仓')
    case 2:
      return i18n.t('middle.包车送仓')
    case 3:
      return i18n.t('middle.快递送仓')
    default:
      return '';
  }
}
